'
底部经验条
'

extends CanvasLayer

@export var experience_manager:Node#指定管理节点
@onready var progress_bar: ProgressBar = $MarginContainer/ProgressBar

func _ready() -> void:
	progress_bar.value = 0
	experience_manager.experience_updated.connect(on_experience_updated)
	pass


func on_experience_updated(current_experience:int,target_experience:int) -> void:
	var percent = current_experience/(target_experience * 1.0)
	progress_bar.value = percent
	pass
